<#include '/admin/header.html' >


<div class="pageview" style="width: 550px; height: 400px; float: left;">
	
</div>

<div class="visitor" style="width: 550px; height: 400px; float: left;margin-left: 10px;">
	
</div>

<script>
$.Loading.show('正在加载，请稍侯...');
var options = {
	url : ctx + "/core/admin/getPageViewData.do?state=1",
	type : "POST",
	dataType : 'json',
	success : function(result) {
		$.Loading.hide();
		var json=result.data;
		
		var title={
			text:'7天浏览量'
		};
		
		var subtitle={
			text:''
		};
		
		
		var xAxis={
			categories:[json[6].time,json[5].time,json[4].time,json[3].time,json[2].time
			            ,json[1].time,json[0].time,]
		};
		
		
		var yAxis={
			title:{
				text:'次'
			},
			plotLines:[{
				value:0,
				width:1,
				color:'#808080'
			}],
			
		};
		
		
		var tooltip = {
			valueSuffix: '\xB0C'
		};
		
		
		
		var legend = {
	      layout: 'vertical',
	      align: 'right',
	      verticalAlign: 'middle',
	      borderWidth: 0
	   	};
		
		
	   	var series=[
	   		{
	   			name:'浏览量',
	   			data:[json[6].pageview,json[5].pageview,json[4].pageview,json[3].pageview
	   			      ,json[2].pageview,json[1].pageview,json[0].pageview]
	   		}
	   	];
	   	
	  
	   	
	  
	   
	   	
	   	var js={};
	   	js.title=title;
	   	js.subtitle=subtitle;
	   	js.xAxis = xAxis;
	    js.yAxis = yAxis;
	    js.tooltip = tooltip;
	    js.legend = legend;
	    js.series = series;
	   
	    
	    $('.pageview').highcharts(js);
	    
	    
	    var title={
				text:'7天访问量'
			};
			
			var subtitle={
				text:''
			};
			
			
			var xAxis={
				categories:[json[6].time,json[5].time,json[4].time,json[3].time,json[2].time
				            ,json[1].time,json[0].time,]
			};
			
			
			var yAxis={
				title:{
					text:'次'
				},
				plotLines:[{
					value:0,
					width:1,
					color:'#808080'
				}],
				
			};
			
			
			var tooltip = {
				valueSuffix: '\xB0C'
			};
			
			
			
			var legend = {
		      layout: 'vertical',
		      align: 'right',
		      verticalAlign: 'middle',
		      borderWidth: 0
		   	};
			
			
		   	var series=[
		   		{
		   			name:'访问量',
		   			data:[json[6].visitor,json[5].visitor,json[4].visitor,json[3].visitor
		   			      ,json[2].visitor,json[1].visitor,json[0].visitor]
		   		}
		   	];
		   	
		  
		   	
		  
		   
		   	
		   	var js={};
		   	js.title=title;
		   	js.subtitle=subtitle;
		   	js.xAxis = xAxis;
		    js.yAxis = yAxis;
		    js.tooltip = tooltip;
		    js.legend = legend;
		    js.series = series;
		   
		    
		    $('.visitor').highcharts(js);
	},
	error : function(e) {
		$.Loading.error("出现错误 ，请重试");
	}
};
$.ajax(options);
</script>
<#include '/admin/footer.html' >
